package com.yaxi.multipkid.filter;

import android.text.InputFilter;
import android.text.Spanned;

/**
 * @author yaxi
 * @date 2019/1/13
 */
public class BaseFilter implements InputFilter {

    protected static final char DIGITS_POINT = '.';

    @Override
    public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
        return null;
    }






    protected boolean contains(CharSequence source, char c) {
        if (source == null) {
            return false;
        }
        for (int i = 0; i < source.length(); i++) {
            if (source.charAt(i) == c) {
                return true;
            }
        }
        return false;
    }

    protected int indexOf(CharSequence source, char c) {
        if (source != null) {
            for (int i = 0; i < source.length(); i++) {
                if (source.charAt(i) == c) {
                    return i;
                }
            }
        }
        return -1;
    }




}
